// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_MTRL_TRANS_ITEM
// * CreateDate    : 2014-06-05 18:30:09
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:09
// * LastChanger   : 2014-06-05 18:30:09
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class InvMtrlTransItemEntity : EntityBase
    {
        public InvMtrlTransItemTable TableSchema
        {
            get
            {
                return InvMtrlTransItemTable.Current;
            }
		}
		
		public InvMtrlTransItemEntity()
        {

        }
		
		public InvMtrlTransItemEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.TransNo = Convert.ToString(CommonFunctions.ToObject(dr["TRANS_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQ_QTY"]));
			this.TransQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRANS_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
        }
		
		public InvMtrlTransItemEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.TransNo = Convert.ToString(CommonFunctions.ToObject(dr["TRANS_NO"]));
			this.MaterialId = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_ID"]));
			this.MaterialName = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_NAME"]));
			this.MaterialCode = Convert.ToString(CommonFunctions.ToObject(dr["MATERIAL_CODE"]));
			this.ReqQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["REQ_QTY"]));
			this.TransQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["TRANS_QTY"]));
			this.Unit = Convert.ToString(CommonFunctions.ToObject(dr["UNIT"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvMtrlTransItemTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_ID)); }
            set { SetData(InvMtrlTransItemTable.C_ID, value); }
        }
		
        [DataMember]
        public string TransNo
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_TRANS_NO)); }
            set { SetData(InvMtrlTransItemTable.C_TRANS_NO, value); }
        }
		
        [DataMember]
        public string MaterialId
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_MATERIAL_ID)); }
            set { SetData(InvMtrlTransItemTable.C_MATERIAL_ID, value); }
        }
		
        [DataMember]
        public string MaterialName
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_MATERIAL_NAME)); }
            set { SetData(InvMtrlTransItemTable.C_MATERIAL_NAME, value); }
        }
		
        [DataMember]
        public string MaterialCode
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_MATERIAL_CODE)); }
            set { SetData(InvMtrlTransItemTable.C_MATERIAL_CODE, value); }
        }
		
        [DataMember]
        public decimal ReqQty
        {
            get { return Convert.ToDecimal(GetData(InvMtrlTransItemTable.C_REQ_QTY)); }
            set { SetData(InvMtrlTransItemTable.C_REQ_QTY, value); }
        }
		
        [DataMember]
        public decimal TransQty
        {
            get { return Convert.ToDecimal(GetData(InvMtrlTransItemTable.C_TRANS_QTY)); }
            set { SetData(InvMtrlTransItemTable.C_TRANS_QTY, value); }
        }
		
        [DataMember]
        public string Unit
        {
            get { return Convert.ToString(GetData(InvMtrlTransItemTable.C_UNIT)); }
            set { SetData(InvMtrlTransItemTable.C_UNIT, value); }
        }
		
		#endregion
	}
	
	
}	

